package com.oig.base.api;

import com.oig.base.api.factory.CountryServiceFallBackFactory;
import com.oig.sys.base.vo.CountryGroupVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(contextId="countryGroupService",value="sys-base-server",path="/countryGroup",fallbackFactory= CountryServiceFallBackFactory.class)
public interface CountryGroupService {

    //@Operation(summary = "查看国际组织,查看详情")
    @PostMapping(value = "/info/{groupId}")
    CountryGroupVo info(@PathVariable("groupId") Integer groupId);

    //@Operation(summary = "根据名称查询组织及国家")
    @PostMapping(value = "/findGroupAllByName")
    CountryGroupVo findGroupAllByName(@RequestParam("groupName")  String groupName);

    //@Operation(summary = "获取所有组织，包含组织国家")
    @PostMapping(value = "/findAllGroupInfo")
    List<CountryGroupVo> findAllGroupInfo();
}
